# Contributor: Isaac Dunham <ibid.ag@gmail.com>
# Maintainer: Isaac Dunham <ibid.ag@gmail.com>
pkgname=heirloom-mailx
pkgver=12.5
pkgrel=0
pkgdesc="A free clone of SysV mailx"
url="http://heirloom.sourceforge.net/mailx.html"
arch="all"
license="BSD-4-Clause"
options="!check" # No test suite
makedepends="openssl-dev krb5-dev"
subpackages="$pkgname-doc"
source="http://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_$pkgver.orig.tar.gz
	makevars.patch
	heirloom-mailx-12.5-fixes-1.patch
	openssl.patch
	nail-11.25-config.patch
	mailx-12.5-usage.patch
	mailx-12.5-lzw.patch
	mailx-12.5-fname-null.patch
	mailx-12.5-collect.patch
	mailx-12.3-pager.patch
	"

build() {
	make
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm 0644 COPYING "$pkgdir"/usr/share/licenses/"$pkgname"/COPYING
	cd "$pkgdir"/usr/share/man/man1/ && mv mailx.1 "$pkgname".1
}

sha512sums="eb4aea0c668354f6fe28137f72bf49d291ce58671a7b70c7775777532e17e59ac52156e68f02937256f0a2f90c132b7c0948553b55daad92a664bd8bbb64774f  heirloom-mailx_12.5.orig.tar.gz
4d7267cfd2c730922aef32fdb71bdf31d44d80ec6b41e150c627ad92fa0b812a2c5e486ffd8fe2729083be86208654c863a96282fdaeed8fea53d6fe32eba578  makevars.patch
5ad6440518c41a91df161ab3bccdcd71fa6136c4d27f82f2838cc80a2c43825993f3f3ea17b9e1fd4048168926cbb24e9f93a65da4cb3cd6abe720831f5a3d5e  heirloom-mailx-12.5-fixes-1.patch
e9c87cea343ce11ca2b439b58c1adff2f508d1ab1b7e13479914cfb870459937a7c410c3930f672f8b32d05da808b964588f7e91c7b738151595b8fbbfb6ee32  openssl.patch
c2473fb73442e5215c6ba92bac9317197b4fbc28494fbb0d3fc8efbbd5156c9fff5b83343d450b6e51e57ce3156927079175bde0d53bcb55f67bcb619dcd9da7  nail-11.25-config.patch
a9fbbaef440cb2c6b9a3b100fb11852795631924b9a99f5a31d773e904db4bf160cf72fad5b8cba5379bf6abffdb075eabbc0971e6b15f804bf5cf27a082302e  mailx-12.5-usage.patch
a69e6db84dc2fbd5543dd22261ac050724266289ab993c045d132804987ec5811620a0e8b2b8f8296844925ca72afe93cdc719e4251a2986b9f18855ca8a29cf  mailx-12.5-lzw.patch
50ca85bb188257b1839b60bd37bf7e16bb39781a4575dc21b5a1b9dc6e40d6b7ec3c93f922729b6ece873a2b19a46085871f32a23109063cf5b961318fcc1ffb  mailx-12.5-fname-null.patch
26ef4cb784c19cd09b16f5e4d944a3e3d51b9163e5e0c1d5d8934ad16f1add7b3c911c160e3e19b41c9c3a9a7c2275f88baa95535a953f2ce1a28823c51582ea  mailx-12.5-collect.patch
29fcd878a46d9575d62f6a6f7f3fbe0387c9d2f23c5f8f86dc28c7293b52ac90c6a03180cb718061cd19fdd5c006f6f34b25f74f9a091531a0a8d2a4ec74fea8  mailx-12.3-pager.patch"
